﻿using System.Collections.Generic;
using System.Web.Http;
using ASP.NetAjaxApplication.Models;

namespace ASP.NetAjaxApplication.Controllers
{
    public class ListController : ApiController
    {
        public IEnumerable<NodeModel> Get()
        {
            return Repository.List.GetAll();
        }

        public IEnumerable<NodeModel> GetClient()
        {
            return Repository.List.GetClients();
        }

        public IEnumerable<string> GetRecentQuotes()
        {
            return Repository.List.GetRecentQuotes();
        }

        public void Post(IEnumerable<NodeModel> tree)
        {
            Repository.List.Update(tree);
        }

        public void Put(int id, [FromBody]string value)
        {
        }

        public void Delete(int id)
        {
        }
    }
}